$(function(){
	queryUrlsData(1);
	//添加角色
	$("#importCard").click(function(){
		window.top.location.href =WEB_ROOT+"/identity_card/card_import_init";
	});
	$("#downloadTemplate").click(function(){
		var url = WEB_ROOT+"/main/downloadExcel";
		var form = $("<form>");
		form.attr('style','display:none');
		form.attr('target','');
		form.attr('method','post');
		form.attr('action',url);
		$("<input type='text' name='fileName' value='身份证号导入模版.xlsx' />").appendTo(form);
		$('body').append(form);
		form.submit();
		form.remove();
	});
});
function queryUrlsData(pageNo){
    var params = {
    	identityCard:$.trim($("#identityCard").val()),
        name:$.trim($("#name").val()),
        pageNo:pageNo,
        pageSize:50
    };

    ajaxLoadPage(params,WEB_ROOT+"/identity_card/card_list",$("#cardlist-div-id"),function(){
        $("#urlPagerId").pager({callback:function(pageNo){
            queryUrlsData(pageNo);
        }});
    });
}